-
Notifications
You must be signed in to change notification settings - Fork 2
chore: improve api definition #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the API definition by replacing confluence-specific endpoints and models with more general source upload endpoints, enabling the system to support arbitrary knowledge sources. Key changes include the removal of confluence parameters and loader code, the renaming and refactoring of extractor API methods, and corresponding updates to the OpenAPI specification and README documentation.
Reviewed Changes
Copilot reviewed 79 out of 79 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
extraction_parameters.py | Introduces ExtractionParameters for general source uploads. |
content_type.py | Minor clean-up of imports and formatting. |
confluence_parameters.py | Removed to deprecate confluence-specific functionality. |
init.py (models) | Updated to only import relevant models. |
exceptions.py, configuration.py, api_response.py, api_client.py | Reordering and minor adjustments to imports and logging. |
extractor_api.py | Renamed and refactored extractor API methods from confluence to source/file endpoints. |
admin_api_base.py, admin_api.py | Renamed endpoints and updated parameters for source and file uploads. |
dependency_container.py | Updated dependency injection to replace confluence loader with source uploader. |
openapi.yaml | Adjusted endpoint definitions and schema references to match the new API design. |
README.md | Updated documentation to reflect the new endpoints and extractor changes. |
API endpoint files (source_uploader.py, file_uploader.py) | Introduced abstract classes for handling source and file uploads. |
…min and extractor APIs
… timeout handling
…ance documentation
…c with optional key-value store removal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR generalizes the Confluence-specific upload into two new endpoints, /upload_file
and /upload_source
, and updates client/server interfaces and documentation accordingly.
- Renamed and expanded extractor methods to handle arbitrary source types.
- Replaced Confluence loader registrations with
DefaultSourceUploader
andDefaultFileUploader
in the DI container. - Refactored FastAPI handlers, OpenAPI spec, and README to align with the new upload endpoints.
Reviewed Changes
Copilot reviewed 100 out of 100 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
extractor_api.py | Renamed extract methods and body params to generic “file”/“source” |
dependency_container.py | Removed Confluence loader, added source/file uploader registrations |
apis/admin_api_base.py & apis/admin_api.py | Updated handler signatures, added subclass checks, revised parameters |
api_endpoints/source_uploader.py | Introduced SourceUploader abstract interface |
api_endpoints/file_uploader.py | Introduced FileUploader abstract interface |
openapi.yaml | Upgraded to 3.1.0 and defined /upload_file & /upload_source paths |
README.md | Updated documentation for the new file/source endpoints |
api_endpoints/document_deleter.py | Extended adelete_document signature for KV store removal |
Comments suppressed due to low confidence (1)
admin-api-lib/src/admin_api_lib/api_endpoints/source_uploader.py:20
- [nitpick] Using
kwargs
for a list of key/value pairs is ambiguous. Rename this parameter to something likeparameters
orkey_value_pairs
for clarity.
kwargs: list[KeyValuePair],
…hanges and configuration adjustments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the API by renaming and generalizing endpoints and associated functions and components from a Confluence‐specific approach to a broader source-based design, while also updating the OpenAPI spec and dependency mappings accordingly.
- Renames functions, classes, and endpoints from “confluence” to “source” (or “file”) to support arbitrary knowledge sources.
- Updates OpenAPI specifications, dependency injection, and documentation to reflect the new API design.
- Adjusts module imports and configurations to accommodate changes in extractor and uploader components.
Reviewed Changes
Copilot reviewed 99 out of 99 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
admin_api_lib/src/admin_api_lib/extractor_api_client/openapi_client/models/init.py | Updated model imports to use ExtractionParameters instead of ConfluenceParameters. |
admin_api_lib/src/admin_api_lib/extractor_api_client/openapi_client/api/extractor_api.py | Renamed methods and updated parameters from confluence to source extraction; adjusted response mappings. |
admin_api_lib/src/admin_api_lib/dependency_container.py | Switched from DefaultConfluenceLoader to DefaultSourceUploader and updated uploader providers. |
admin_api_lib/src/admin_api_lib/apis/admin_api_base.py & admin_api_lib/src/admin_api_lib/apis/admin_api.py | Renamed routes and updated parameter types and docstrings to reflect file/source uploads. |
admin-api-lib/openapi.yaml | Updated OpenAPI version, endpoint paths, and schema definitions for new source-based endpoints. |
README.md | Revised endpoint listings and descriptions to reflect renamed and repurposed API endpoints. |
Comments suppressed due to low confidence (1)
admin-api-lib/src/admin_api_lib/extractor_api_client/openapi_client/api/extractor_api.py:329
- The inclusion of a 404 response mapped to None represents a breaking change from previous behavior. Please ensure that this design decision is intentional and that corresponding API documentation is updated to reflect the handling of not-found scenarios.
"404": None,
Co-authored-by: Copilot <[email protected]>
…eter alias in upload_source function
…-library into onapitorulethemall
…ns in upload_source function
…-library into onapitorulethemall
…e unused managed_page_summary_enhancer module
…r DefaultSourceUploader to use it refactor: update JSON serialization in ExtractionParameters, ExtractionRequest, InformationPiece, and KeyValuePair models refactor: remove unused test files for confluence and thread management integration
…load_source function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Change the confluence upload endpoint to a general source upload endpoint.
This will make it easier to add arbitrary knowledge sources and their respective extractors.
This PR will make breaking changes to the definition of the extractor and the admin backend.